﻿Imports System.Data.OleDb
Public Class showuserprofile
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        displayData()
    End Sub
    Protected Sub displayData()
        Dim conn As New OleDb.OleDbConnection(ConfigurationManager.ConnectionStrings("BookMeetConnString").ConnectionString)
        conn.Open()
        Dim cmd As New OleDbCommand("SELECT * FROM userprofiles WHERE (ID = ?)", conn)
        cmd.Parameters.AddWithValue("@f1", Request.Params("ID"))
        UserProfileInfo.DataSource = cmd.ExecuteReader()
        UserProfileInfo.DataBind()
        conn.Close()
        displayMemberships()
    End Sub
    Protected Sub displayMemberships()
        Dim conn As New OleDb.OleDbConnection(ConfigurationManager.ConnectionStrings("BookMeetConnString").ConnectionString)
        conn.Open()
        Dim cmd As New OleDbCommand("SELECT * FROM clubuserjunction WHERE (UserName = ?)", conn)
        cmd.Parameters.AddWithValue("@f1", Request.Params("ID"))
        bookClubMemberships.DataSource = cmd.ExecuteReader()
        bookClubMemberships.DataBind()
        conn.Close()
    End Sub
End Class